/*
 * @Author: ssyyw 2294779310@qq.com
 * @Date: 2024-03-29 00:07:18
 * @LastEditors: ssyyw 2294779310@qq.com
 * @LastEditTime: 2024-03-31 16:13:08
 * @FilePath: \Work\mavproxy\ws_ros1\src\mavproxy_ros1\src\drone_mode.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#pragma once

// -----------------------------飞行模式-----------------------------
// mavros获得的无人机状态
// header：消息头，包含时间戳和框架信息；
// connected：表示是否连接到了 mavros 节点；
// armed：表示无人机当前是否上锁；
// guided：表示无人机当前是否处于 GUIDED 模式；
// mode：表示当前无人机所处的模式，包括以下几种：
// MANUAL，ACRO，ALTCTL，POSCTL，OFFBOARD，STABILIZED，RATTITUDE，AUTO.MISSION AUTO.LOITER，AUTO.RTL，AUTO.LAND，AUTO.RTGS，AUTO.READY，AUTO.TAKEOFF
const std::string MANUAL_MODE = "MANUAL";
const std::string ACRO_MODE = "ACRO";
const std::string KEEP_MODE = "AUTO.LOITER";
const std::string LAND_MODE = "AUTO.LAND";
const std::string TAKEOFF_MODE = "AUTO.TAKEOFF";
const std::string GUIDED_MODE = "GUIDED";
const std::string POSITION_MODE = "POSCTL";
const std::string OFF_BOARD_MODE = "OFFBOARD";

// -----------------------------发布主题----------------------------
const std::string MAVROS_SET_LOCAL_POSE = "/mavros/setpoint_position/local";
const std::string MAVROS_SET_GLOABL_POSE = "/mavros/setpoint_position/global";
const std::string MAVROS_SET_VELOCITY = "/mavros/setpoint_velocity/cmd_vel_unstamped";
const std::string MAVROS_SET_ACCEL = "/mavros/setpoint_accel/accel";
const std::string MAVROS_SET_ATTITUDE = "mavros/setpoint_attitude/attitude";

// -----------------------------服务客户端----------------------------
const std::string MAVROS_SRV_ARM = "/mavros/cmd/arming";
const std::string MAVROS_SRV_MODE = "/mavros/set_mode";
const std::string MAVROS_SRV_TAKEOFF = "/mavros/cmd/takeoff";
const std::string MAVROS_SRV_LAND = "/mavros/cmd/land";

// -----------------------------订阅主题----------------------------
const std::string MAVROS_INFO_STATE = "/mavros/state";
const std::string MAVROS_INFO_TIME = "/mavros/time_reference";
const std::string MAVROS_INFO_LOCAL_POSE = "/mavros/local_position/pose";
const std::string MAVROS_INFO_VELOCITY = "/mavros/local_position/velocity";
const std::string MAVROS_INFO_GPS_POS = "/mavros/global_position/global";

// ------------------------------自定义消息----------------------------
const std::string MAVPROXY_DIRECT_CMD = "/mavproxy_ros1/parsed_flight_cmd";
const std::string MAVPROXY_TARGET_MODE = "/mavproxy_ros1/target_mode";

const int GLOBAL_TIMEOUT_LIMIT = 30;
const int GLOBAL_RETRY_TIMES = 3;

// -------------------------------飞行命令---------------------------
const std::string CMD_FLIGHT_TAKEOFF = "flight_taoff";
const std::string CMD_FLIGHT_LAND = "flight_land";
const std::string CMD_FLIGHT_FLY_POS = "flight_targetpos";
const std::string CMD_FLIGHT_HOVER = "flight_hover";
